package es.deusto.ingenieria.tesoroaventurero;

import java.awt.Point;
import java.util.Comparator;

public class GemaComparator implements Comparator<Point> {

	@Override
	public int compare(Point o1, Point o2) {
		 if(o1.getX()+o1.getY() > o2.getX()+o2.getY())
	            return 1;
	        else if(o1.getX()+o1.getY() < o2.getX()+o2.getY())
	            return -1;
	        else
	            return 0;    
	    }
	}



